package com.book.service;

import com.book.core.domain.BorrowRecords;
import com.baomidou.mybatisplus.extension.service.IService;
import com.book.core.vo.BookCategoryLikeVO;
import com.book.core.dto.ReaderBorrowBookDTO;
import com.book.core.mode.LineBarChart;
import com.book.core.mode.R;
import com.book.core.query.BorrowRecordQuery;
import com.book.core.vo.PageVO;
import com.book.core.vo.ReadingStarVO;

import java.util.List;

/**
* @author hongmizfb
* @description 针对表【borrow_records(图书借阅记录)】的数据库操作Service
* @createDate 2025-05-08 22:32:22
*/
public interface BorrowRecordsService extends IService<BorrowRecords> {

    /**读者新借书
     * @param dto
     * @return {@link R }
     */
    R newBorrowBook(ReaderBorrowBookDTO dto);

    /**读者还书
     * @param borrowRecordIdList 归还记录表
     * @return {@link R }
     */
    R returnBook(List<Long> borrowRecordIdList);

    /**续借图书
     * @param recordIdList
     * @return {@link R }
     */
    R renewBook(List<Long> recordIdList);

    PageVO<BorrowRecords> getBorrowRecordPage(BorrowRecordQuery query);

    LineBarChart getBorrowStatisticByTimeRange(String range);

    /**阅读之星（10条）
     * @return {@link List }<{@link ReadingStarVO }>
     */
    List<ReadingStarVO> getReadingStar();

    List<BookCategoryLikeVO> getBookBorrowCount();
}
